
cap program drop nameclean
program define nameclean
	local name = "`1'"
	replace `name'=trim(`name')
	replace `name' =lower(`name')
	replace `name'=subinstr(`name',",","",.)
		replace `name'=subinstr(`name',"_"," ",.)
	replace `name'=subinstr(`name',".","",.)
	replace `name'=subinstr(`name',"-"," ",.)
	replace `name'=subinstr(`name',"/"," ",.)
	replace `name'=subinstr(`name',"(","",.)
	replace `name'=subinstr(`name',")","",.)
	replace `name'=subinstr(`name',"'","",.)
	replace `name'=subinstr(`name',"  "," ",.)
	replace `name'=subinstr(`name',"&"," ",.)
	replace `name'=subinstr(`name',";","",.)
	
		replace `name'=trim(`name')
	
forvalues x=1/10 {
	replace `name'=subinstr(`name',"  "," ",.)
	}
end
